package edu.umb.cs.antmanager.common;

import java.io.Serializable;

import edu.umb.cs.antmanager.domain.TestType;

/**
 * Bean used to represent agen't running status
 * 
 * @author 2009CS682-3UMB_AntManager
 * 
 */
public class MachineStatus implements Serializable {
	/**
	 * Store agent's status information
	 */
	private static final long serialVersionUID = 1L;
	private final String machineName;
	private String status;
	private TestType runningTest;

	/**
	 * create <tt>MachineStatus</tt> object using agent's host name
	 * 
	 * @param machineName
	 *            Agent's host name
	 */
	public MachineStatus(String machineName) {
		this.machineName = machineName;
	}

	/**
	 * get Agent's running status, idle or busy
	 * 
	 * @return Agent's running status
	 */
	public String getStatus() {
		return status;
	}

	/**
	 * Set agent's running status
	 * 
	 * @param status
	 *            new status
	 */
	public void setStatus(String status) {
		this.status = status;
	}

	/**
	 * Get the current running test of the agent
	 * 
	 * @return <tt>TestType</tt> of the running test
	 */
	public TestType getRunningTest() {
		return runningTest;
	}

	/**
	 * set current running test
	 * 
	 * @param runningTest
	 *            <tt>TestType</tt> of the running test
	 */

	public void setRunningTest(TestType runningTest) {
		this.runningTest = runningTest;
	}

	/**
	 * get Agent's host name
	 * 
	 * @return Agent's host name
	 */
	public String getMachineName() {
		return machineName;
	}

}
